<?php
$params = array_merge(
    require(__DIR__ . '/../../common/config/params.php'),
    require(__DIR__ . '/../../common/config/params-local.php'),
    require(__DIR__ . '/params.php'),
    require(__DIR__ . '/params-local.php')
);

return [
    'id' => 'app-backend',
    'basePath' => dirname(__DIR__),
    'controllerNamespace' => 'backend\controllers',
    'bootstrap' => ['log'],
	'language'=>'zh-CN',
    'modules' => [],
    'components' => [
        'user' => [
            'identityClass' => 'common\models\Admin',
            'enableAutoLogin' => true,
        ],
        'log' => [
            'traceLevel' => YII_DEBUG ? 3 : 0,
            'targets' => [
                [
                    'class' => 'yii\log\FileTarget',
                    'levels' => ['error', 'warning'],
                ],
            ],
        ],
        'errorHandler' => [
         'errorAction' => 'site/error',
        ],
    	'i18n' => [
    				'translations' => [
    						'common' => [
    								'class' => 'yii\i18n\PhpMessageSource',
    								//'basePath' => '/messages',
    								'fileMap' => [
    										'common' => 'common.php',
    								],
    						],
    						'power' => [
    								'class' => 'yii\i18n\PhpMessageSource',
    								//'basePath' => '/messages',
    								'fileMap' => [
    										'power' => 'power.php',
    								],
    						],
    				],
    		],
    	'authManager' => [
    				'class' => 'yii\rbac\DbManager',
    				'itemTable' => 'auth_item',
    				'assignmentTable' => 'auth_assignment',
    				'itemChildTable' => 'auth_item_child',
    		],
    ],
    'params' => $params,
];
